package com.sj.common.dto.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: xiaoqi
 * Date: 2022-03-17
 * Time: 下午 15:33
 * Description: 用户文章数据模型
 *
 * @author xiaoqi
 * @since 2022-03-17
 */
@ApiModel("用户文章数据模型")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserArticleDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id 主键 自增长")
    private Integer id;

    @ApiModelProperty("回答问题数量")
    private Long answerNum;

    @ApiModelProperty("关注问题数量")
    private Long attentionQuestionNum;

    @ApiModelProperty("提问数量")
    private Long questionNum;

    @ApiModelProperty("博客数量")
    private Long blogNum;

    @ApiModelProperty("想法数量")
    private Long ideaNum;

    @ApiModelProperty("收藏数量")
    private Long collectNum;

    @ApiModelProperty("足迹数量")
    private Long footprintNum;

    public static UserDataDtoBuilder builder() {
        return new UserDataDtoBuilder();
    }

    public static final class UserDataDtoBuilder {
        private Integer id;
        private Long answerNum;
        private Long attentionQuestionNum;
        private Long questionNum;
        private Long blogNum;
        private Long ideaNum;
        private Long collectNum;
        private Long footprintNum;

        private UserDataDtoBuilder() {
        }

        public UserDataDtoBuilder id(Integer id) {
            this.id = id;
            return this;
        }

        public UserDataDtoBuilder answerNum(Long answerNum) {
            this.answerNum = answerNum;
            return this;
        }

        public UserDataDtoBuilder attentionQuestionNum(Long attentionQuestionNum) {
            this.attentionQuestionNum = attentionQuestionNum;
            return this;
        }

        public UserDataDtoBuilder questionNum(Long questionNum) {
            this.questionNum = questionNum;
            return this;
        }

        public UserDataDtoBuilder blogNum(Long blogNum) {
            this.blogNum = blogNum;
            return this;
        }

        public UserDataDtoBuilder ideaNum(Long ideaNum) {
            this.ideaNum = ideaNum;
            return this;
        }

        public UserDataDtoBuilder collectNum(Long collectNum) {
            this.collectNum = collectNum;
            return this;
        }

        public UserDataDtoBuilder footprintNum(Long footprintNum) {
            this.footprintNum = footprintNum;
            return this;
        }

        public UserArticleDto build() {
            UserArticleDto userDataDto = new UserArticleDto();
            userDataDto.setId(id);
            userDataDto.setAnswerNum(answerNum);
            userDataDto.setAttentionQuestionNum(attentionQuestionNum);
            userDataDto.setQuestionNum(questionNum);
            userDataDto.setBlogNum(blogNum);
            userDataDto.setIdeaNum(ideaNum);
            userDataDto.setCollectNum(collectNum);
            userDataDto.setFootprintNum(footprintNum);
            return userDataDto;
        }
    }
}